<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2019-06-28
  Time: 9:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String pash = request.getContextPath();
    String basepash = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + pash + "/";
%>
<html>
<head>
    <base href="<%=basepash%>">
    <%@include file="/publs.jsp"%>
    <title>Title</title>
</head>
<body>
<div id="root">

    <%--<i-button style="margin-left: 95%;position: absolute;top: 20px" type="primary" @click="fanhui">返回</i-button>--%>

    <%--<Row  style="margin-left:50px;margin-top: 20px;margin-bottom: -20px">--%>
        <%--<i-col>--%>
    <%--<i-form :label-width="80" :inline="true">--%>
        <%--<form-item label="供应商公司">--%>
            <%--<i-input v-model="companyName"></i-input>--%>
        <%--</form-item>--%>
        <%--<form-item label="姓名">--%>
            <%--<i-input v-model="name"></i-input>--%>
        <%--</form-item>--%>
        <%--<form-item label="手机号">--%>
            <%--<i-input v-model="phone"></i-input>--%>
        <%--</form-item>--%>
        <%--<i-button icon="ios-search" @click="qingkong">清空</i-button>--%>
        <%--<i-button type="primary" icon="ios-search" @click="select">查询</i-button>--%>
    <%--</i-form>--%>
    <%--</i-col>--%>
    <%--</Row>--%>


    <%--<i-table :height="heights" style="margin-top:20px;margin-right: 50px;margin-left: 50px;" :data="datasasd" :columns="colunmsss" border>--%>

    <%--</i-table>--%>
    <%--<page :total="totals"  @on-change="onchenge" :page-Size="pageSize" show-sizer :page-size-opts="[5,10,15,20]" @on-page-size-change="onPageSizeChange"></page>--%>

        <Transfer
                :data="data1"
                :target-keys="targetKeys1"
                :render-format="render1"
                @on-change="handleChange1"></Transfer>
</div>
<script>
    let _this = null;
    new Vue({
        el:"#root",
        data:{
            // datasasd:[],
            // colunmsss:[
            //     {
            //         title:"药品信息01",
            //         key:""
            //     },{
            //         title:"药品信息02",
            //         key:""
            //     },{
            //         title:"药品信息03",
            //         key:""
            //     },{
            //         title:"药品信息04",
            //         key:""
            //     }
            // ],
            // heights:0,
            // totals:0,
            // pageNo:0,
            // pageSize:5
            data1: [],
            targetKeys1: []
        },
        methods:{
            // onchenge(size){
            //     this.pageNo = size;
            //     this.select();
            // },
            // onPageSizeChange(size){
            //     this.pageSize = size;
            //     this.select();
            // },
            // qingkong(){
            //     this.name = "";
            //     this.companyName = "";
            //     this.phone = "";
            // },
            // select(){
                // axios.get("").then(({data})=>{
                //     _this.datasasd = data.obj.list;
                //     _this.totals = data.obj.tatle;
                //     _this.heights = data.obj.list.length * 48 + 40;
                // })
            // },
            // fanhui(){
            //     window.location.href='/fanhui';
            // }


            getMockData () {
                let mockData = [];
                let zhi =[
                    {
                        name:"张三",
                        id:"10"
                    },{
                        name:"李四",
                        id:"11"
                    },{
                        name:"王五",
                        id:"12"
                    }
                ]
                for (let i = 0; i < zhi.length; i++) {
                    mockData.push({
                        key: zhi[i].id,//id
                        label:zhi[i].name,//文字
                        // description: 'The desc of content  ' + i,
                        // disabled: Math.random() * 3 < 1
                    });
                }
               this.data1 = mockData;
            },
            getTargetKeys () {
                this.data1()
                    .filter(() => Math.random() * 2 > 1)
                    .map(item => item.key);
            },
            render1 (item) {
                return item.label;
            },
            handleChange1 (newTargetKeys, direction, moveKeys) {
                console.log(newTargetKeys);
                console.log(direction);
                console.log(moveKeys);
                this.targetKeys1 = newTargetKeys;
            }
        },
        mounted(){
            this.getMockData();
            // this.getTargetKeys();
            // this.select();
        },
        created(){
            _this = this;
        }
    })
</script>
</body>
</html>
